home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / SYS / s / startServer.rexx < prev    next >
OS/2 REXX Batch file  |  1996-09-26  |  727b  |  32 lines

  1. /*
  2. startServer.rexx
  3.  
  4.     This little ARexx macro starts up a ARexx server if its port
  5. isn't already available.
  6.     I can't believe this isn't included in the standard ARexx
  7. distribution or libraries - hasn't every Amiga owner in the world
  8. had to write one of these by now?
  9.  
  10. Inputs:
  11.     arg 1   port    ARexx port for the server
  12.     arg 2   server  The server's executable.
  13.  
  14.     Public domain.  Use as you will.
  15. Author:
  16.  
  17. -- 
  18. Glenn       | ...!uunet!anagld!dahlgren!glenn      (UUCP)
  19. Holliday    | glenn@sed.csc.com                    (fully domained)
  20.  
  21. */
  22. startServer.rexx:
  23.  
  24. if (arg() < 2) then exit 1
  25. else do
  26.    if ~(Show('P', arg(1))) then do
  27.        address command 'run ' arg(2)
  28.        address command 'WaitForPort ' arg(1)
  29.    end
  30. end
  31. return 0
  32.